---@meta _

---Returns the spell name and spell rank for a spell in the player's spellbook.
---@param spellIndex number
---@param bookType? string
---@return number startTime
---@return number duration
---@return number enable
function GetSpellCooldown(spellIndex, bookType) end

---[文档](https://warcraft.wiki.gg/wiki/API_GetSpellName?oldid=3856425)
---Returns the spell name and spell rank for a spell in the player's spellbook.
---@param spellIndex number
---@param bookType? string
---@return string spellName
---@return string spellRank
function GetSpellName(spellIndex, bookType) end

---Cast the specified spell by display name.
---@param name string
---@param onSelf? boolean|string|number
function CastSpellByName(name , onSelf) end

---@param spell number|string
---@return number icon
---@overload fun(index: number, bookType: string)
function GetSpellTexture(spell) end

---Returns the total number of tabs in the user's spellbook.
---@return number numTabs
function GetNumSpellTabs() end

---Returns information about the specified
---@param spellbookTabNum number
---@return string name The name of the spell line (General, Shadow, Fury, etc.)
---@return string texture The texture path for the spell line's icon
---@return number offset The number of spells before this spell line (will be one less than the index of the first spell in this spell line)
---@return number numSpells The number of spells in this spell line
function GetSpellTabInfo(spellbookTabNum) end

-- [文档](https://warcraft.wiki.gg/wiki/API_IsCurrentCast?oldid=3856425)
-- 是否为当前施法；后续版本被`IsCurrentSpell`取待
---@param id number|string
---@param bookType? string
---@return boolean isCast
function IsCurrentCast(id, bookType) end

--[[
CastShapeshiftForm(index)
CastSpell(spellID, "bookType")   - Cast the specified spell by ID. spellbookTab is "spell" or "pet".
CastSpellByName("name"[, onSelf])   - Cast the specified spell by display name.
GetCraftSpellFocus(index)   - ?.
GetNumShapeshiftForms()
GetNumSpellTabs()   - Returns the total number of tabs in the user's spellbook.
GetQuestLogRewardSpell - ?.
GetRewardSpell - ?.
GetShapeshiftFormCooldown(index)
GetShapeshiftFormInfo(index)   - Retrieves information about an available ShapeshiftForm or Stance.
GetSpellCooldown(spellID, "bookType")   - Retrieves data on the cooldown of a specific spell within your spellbook..
GetSpellName(spellID, "bookType")   - Returns the spell name and spell rank for a spell in the player's spellbook.
GetSpellTabInfo(spellbookTabNum)   - Returns information about the specified spellbook tab.
GetSpellTexture(spellID, "bookType")   - ?.
GetTrackingTexture()   - Return the texture of the current tracking buff, if one is active.
IsCurrentCast(id, "bookType")
IsSpellPassive(spellID, "bookType")   - Returns whether the icon in your spellbook is a Passive ability.
IsTrainerServiceLearnSpell(index)
PickupSpell(spellID, "bookType")   - Loads an action button onto the cursor to be dropped into a quickbar slot.
PlayerHasSpells()   - ?.
SpellCanTargetUnit("unit")   - Returns true if the spell awaiting target selection can be cast on the specified unit.
SpellIsTargeting()   - Returns true if a spell has been cast and is awaiting target selection.
SpellStopCasting()   - Stops the current spellcast. (As of 1.10 PTR, this function must be used in direct response to a hardware input event, such as a mouse click or key press.)
SpellStopTargeting()   - Cancels the spell awaiting target selection.
SpellTargetUnit("unit")   - Casts the spell awaiting target selection on the specified unit.
UI ToggleSpellBook("bookType")   - Shows the spellbook. Can show your spells or your pet's.
UpdateSpells()   - ?.
]]